<!--
*  功能描述：合同收费详情
 -->
  <template>
  <div>
    <el-tag style="width: 100%; text-align: left; font-size: 20px"
      >统计条件</el-tag
    >
    <el-form>
        <el-form-item label="项目名称" prop="DName">
        
      <el-select v-model="DName" placeholder="请选择" clearable> 
        <el-option
          v-for="item in Depart"
          :key="item.ProjectId"
          :value="item.ProjectName"
          :label="item.ProjectName"
          ></el-option
        ></el-select
      >

      &nbsp;&nbsp;<el-button type="primary" @click="onsubmit">查询</el-button>
      </el-form-item>
      </el-form>
      


      <el-tag style="width: 100%; text-align: left; font-size: 20px"
      >统计结果</el-tag
    >
    <div >
      <el-table :data="tabledata" border style="width: 100%">
        <el-table-column prop="ContractNumber" label="合同编号" >
        </el-table-column>
        <el-table-column prop="DName" label="项目名称" >
        </el-table-column>
        <el-table-column prop="BuildingArea" label="面积(㎡)" >
        </el-table-column>
        <el-table-column prop="RealyContractPrice" label="合同额" >
        </el-table-column>
        <el-table-column prop="CreateTime" label="收款日期" >
        </el-table-column>
        <el-table-column prop="BuildingType" label="建筑分类" >
        </el-table-column>
        <el-table-column prop="ContractType" label="合同分类" >
        </el-table-column>
        <el-table-column prop="ContractRemarks" label="备注" >
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      Depart:[],
      tabledata: [],
          DName:'',
    };
  },
  methods: {
    onsubmit(){
      this.ShowCountPro();
    },
      cha(){
          this.ShowCountPro();
      },
    ShowCountPro() {
      this.$http({
        url: "LeadingCockpit/GetContract4s",
        method: "Get",
        params: {
            DName:this.DName,
        }
      }).then((res) => {
        this.tabledata = res.data;
        console.log(res.data);
      });
    },
    DeptXl() {
      this.$http({
        url: "LeadingCockpit/GetProject2",
        method: "Get",
      }).then((res) => {
        this.Depart = res.data;
        console.log(this.data);
      });
    },
  },
  created() {
    this.ShowCountPro();
    this.onsubmit();
    this.DeptXl();
  },
};
</script>